<?php

/*

Edit Shop (edit_shop.php)

*/

$page_title = "Edit Shop";
$rank_check = 1;
include "header.inc.php";

print "$openHTML";

$find_shop = fetch("SELECT * FROM usershops2 WHERE owner = '$userid' AND game = '$game'");

if (!$find_shop[id])
{
	die("You do not have a shop yet, please click <a href=makeshop.php?game=$game>here</a> to create one.$closeHTML");
}

ECHO <<<END

<p align=center><a href=myshop.php?game=$game>My Stock</a> | <a href=edit_shop.php?game=$game>Edit Shop</a> | <a href=usershop.php?game=$game&user=$username>View Shop</a> | <a href=upgrade_shop.php?game=$game>Upgrade Shop</a> | <a href=sales_log.php?game=$game>Sales Log</a></p>

<P align=center><FORM ACTION="edit_shop.pro.php?game=$game" METHOD=POST>
   <CENTER><BR>
   <TABLE BGCOLOR="$tableOutline" CELLSPACING=1 CELLPADDING=0 WIDTH=450>
      <TR BGCOLOR="$topAndBottomBG">
         <TD COLSPAN=2 HEIGHT=50>
            <CENTER class=white><FONT SIZE="+2" COLOR="$topAndBottomText"><B>--Edit
            Your Shop--</B></FONT></CENTER>
         </TD>
      </TR>
      <TR BGCOLOR="$maincellColor">
         <TD WIDTH=100>
            <P>Shop Name:</P>
         </TD>
         <TD>
            <P>&nbsp;<INPUT TYPE=text NAME=shop_name VALUE="$find_shop[shop_name]" SIZE=30 MAXLENGTH=32>
            <FONT SIZE="-1"><I>(32 char max.)</I></FONT></P>
         </TD>
      </TR>
      <TR BGCOLOR="$reallyLight">
         <TD WIDTH=100>
            <P>Shop Desc:</P>
         </TD>
         <TD>
            <P>&nbsp;<TEXTAREA NAME=shop_desc ROWS=7 COLS=34 WRAP=virtual>$find_shop[shop_desc]</TEXTAREA></P>
         </TD>
      </TR>
      <TR BGCOLOR="#FFFFFF">
         <TD COLSPAN=2>
            <CENTER><INPUT TYPE=submit VALUE="Edit Shop!"></CENTER>
         </TD>
      </TR>
   </TABLE>
   </CENTER>
</FORM></P>

END;

print "$closeHTML";
?>